/*
	file        : testPowerMod.gp
	description : generate test case (b^e) % m for python
*/
{
	read("../../src/diffieHellmanXTEA/searchPrime.gp");
	outputFile = "powerModeResult.py";
	test = 10;
	m = searchPrime(160);
	print (m);
	write (outputFile, "modulus = ",m);
	write (outputFile, "resultFromGP = [");
	forstep(i = 1, test, 1,
		print(i);

		b = random(100);
		e = random(100);
		r = (b^e) % m;
		write (outputFile, "[",b, ",", e,",",r,"]");
		if (i < test,
			write (outputFile, ",");
		);
	);
	write (outputFile, "]");
}
